package com.cloud.servicegreyrelease2.controller;

import com.cloud.servicegreyrelease2.service.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MainController {

    @Value("${server.port}")
    private String serverPort;

    @Autowired
    private ProviderService providerService;

    @GetMapping("/getMessage")
    public String getMessage(){
        return serverPort;
    }

    @GetMapping("/getProviderInfo")
    public String getProviderInfo(){
        return providerService.getServiceInfo();
    }
}
